import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import { Provider } from 'react-redux'
import store from './store'
import { HashRouter as Router, Switch, Route, Redirect } from 'react-router-dom'


import './reset.scss'
import './index.scss'
import { Login, NotFound } from './pages'

ReactDOM.render(
    <Provider store={store}>
        {/*正确的写法*/}
        <Router>
            <Switch>
                <Redirect from="/" to="/login" exact></Redirect>
                <Route path="/none" component={NotFound} exact></Route>
                <Route path="/login" component={Login} exact></Route>
                <Route path="/" component={App}></Route>
            </Switch>
        </Router>
    </Provider>,
    document.getElementById('root')
)
